﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.IO;
using System.Drawing;

namespace ThinhTien.Common
{
    public static class Utils
    {
        //public static Byte[] ConvertToByteArray(MemoryStream fileBytes)
        //{
        //    var msResized = new MemoryStream();
        //    MemoryStream ms = new MemoryStream(fileBytes);
        //    Image originalImage = Image.FromStream(ms);
        //    Image resizedImage = originalImage.GetThumbnailImage(150, (150 * originalImage.Height) / originalImage.Width, null, IntPtr.Zero);

        //    resizedImage.Save(msResized, System.Drawing.Imaging.ImageFormat.Png);
        //    return msResized.ToArray();
        //}

        //public static byte[] ConvertToByteArray(Stream stream)
        //{
        //    throw new NotImplementedException();
        //}
    }
}
